<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
class Push_config extends MY_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->verify_user();
	}

	public function index()
	{
		$d = $this->db->get('money_config')->row_array();
		$this->view('push_config', $d);
	}

	public function update()
	{
		$is_push = $this->input->post('is_push');
		$data = array('is_push' => $is_push);

		if ($this->db->update('money_config', $data)) {
			echo json_encode(array('msg' => '修改成功', 'error' => 0));
		}
		else {
			echo json_encode(array('msg' => '修改失败', 'error' => 1));
		}
	}
}

?>
